package com.zwk.gulimall.product.annotation;

import com.zwk.gulimall.product.annotation.group.AllGroup;
import com.zwk.gulimall.product.entity.BrandEntity;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;
import org.springframework.core.annotation.AliasFor;

import javax.validation.constraints.NotNull;
import java.lang.annotation.*;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.TYPE})
/**
 * 用在属性上：指定该属性发生变化后调用的哪些方法
 */
public @interface Relation {

    Class[] value();

    Class[] group() default AllGroup.class;

    /**
     * 当重复使用父注解时，父注解的值会放到子注解中
     */
//    @Target({ElementType.FIELD})
//    @Documented
//    @Retention(RetentionPolicy.RUNTIME)
//    public @interface List {
//        Relation[] value();
//    }
}
